package com.work.demo.test;

import lombok.Data;

import java.util.List;

/**
 * @author shahua
 * 资源 包括page api等资源
 */
@Data
public class ResourceVO implements Comparable<ResourceVO> {

    private String code;

    private String name;

    private String type;

    private Boolean selected;

    private Integer priority;

    private String parentCode;

    private List<ResourceVO> children;

    @Override
    public int compareTo(ResourceVO o) {

        if(o == null) {
            return 0;
        }

        return priority.compareTo(o.getPriority());
    }
}
